package servlet.listener.session;

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

public class SessionAttributeDemo implements HttpSessionAttributeListener {

    public SessionAttributeDemo() {
    	
    }

    public void attributeRemoved(HttpSessionBindingEvent se) {
    	System.out.println(se.getSession().getId() + ",移除属性-->属性名称" + se.getName() + ",属性内容" + se.getValue());
    }

    public void attributeAdded(HttpSessionBindingEvent se) {
    	System.out.println(se.getSession().getId() + ",增加属性-->属性名称" + se.getName() + ",属性内容" + se.getValue());
    }

    public void attributeReplaced(HttpSessionBindingEvent se) {
    	System.out.println(se.getSession().getId() + ",替换属性-->属性名称" + se.getName() + ",属性内容" + se.getValue());
    }
	
}
